package dfbz.com.model;

import dfbz.com.annotation.Filed;
import dfbz.com.annotation.Table;

import java.util.Date;
@Table("article")
public class Article  {

    /**
     * id
     */
    private Integer id;

    /**
     * 文章标题
     */
    private String title;

    /**
     * 文章内容
     */
    private String content;

    /**
     * 浏览次数
     */
    @Filed("browse_count")
    private Integer browseCount;

    /**
     * 发布时间
     */
    @Filed("publish_date")
    private Date publishDate;

    /**
     * 发布人名称
     */
    @Filed("publish_username")
    private String publishUsername;

    /**
     * 发布人id
     */
    @Filed("user_id")
    private Integer userId;

    public Article() {
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getBrowseCount() {
        return browseCount;
    }

    public void setBrowseCount(Integer browseCount) {
        this.browseCount = browseCount;
    }

    public Date getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }

    public String getPublishUsername() {
        return publishUsername;
    }

    public void setPublishUsername(String publishUsername) {
        this.publishUsername = publishUsername;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "Article{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", browseCount=" + browseCount +
                ", publishDate=" + publishDate +
                ", publishUsername='" + publishUsername + '\'' +
                ", userId=" + userId +
                '}';
    }
}

